﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Diagnostics;

namespace CloudAppMonitor
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            bool eventSourceExists = false;

            try
            {
                eventSourceExists = EventLog.SourceExists(Monitor.EVENT_SOURCE);
            }
            catch (Exception) { }

            if (!eventSourceExists)
            {
                MessageBox.Show("Please use 'InstallUtil' to install the Hedgehog Cloud App Monitor.", "Hedgehog Development");

                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Monitor());
        }
    }
}
